/* ==================== 网易云风格音乐播放器样式 ==================== */

/* 全局音乐播放器容器 - 浅色背景 */
.music-player-container {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    padding: 20px;
    position: relative;
}

/* 主播放器卡片 */
.music-player-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
}

/* 播放器布局 */
.player-layout {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

/* 左侧音乐列表区域 - 25%宽度 */
.music-list-section {
    width: 25%;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 107, 107, 0.1);
}

.music-list-title {
    color: #333;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 2px solid #ff6b6b;
    padding-bottom: 10px;
}

.music-list-title::before {
    content: '🎵';
    font-size: 20px;
}

/* 音乐列表表格 */
#musicTable {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

#musicTable tbody tr {
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(255, 107, 107, 0.1);
    cursor: pointer;
}

#musicTable tbody tr:hover {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.08), rgba(238, 90, 36, 0.08));
    transform: translateX(5px);
}

#musicTable tbody tr:last-child {
    border-bottom: none;
}

#musicTable td {
    padding: 12px 8px;
    font-size: 14px;
    color: #333;
}

#musicTable .song-name {
    font-weight: 500;
    color: #333;
    transition: all 0.3s ease;
}

#musicTable .song-name:hover {
    color: #ff6b6b;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
}

.pagination a,
.pagination span {
    padding: 8px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: #666;
    font-size: 14px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.pagination a:hover {
    background: #ff6b6b;
    color: white;
    border-color: #ff6b6b;
}

.pagination span {
    background: #ff6b6b;
    color: white;
    border-color: #ff6b6b;
}

/* 右侧播放器区域 */
.player-main-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 600px;
}

/* 3D封面旋转区域 */
.cover-section {
    margin-bottom: 40px;
}

.ring-wrapper {
    width: 300px;
    height: 300px;
    margin: 0 auto;
    position: relative;
    perspective: 1000px;
}

.mini-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    transform-style: preserve-3d;
    transform: translate(-50%, -50%);
}

.mini-ring.spin {
    animation: spin3D 20s linear infinite;
}

@keyframes spin3D {
    from { transform: translate(-50%, -50%) rotateY(0deg); }
    to { transform: translate(-50%, -50%) rotateY(360deg); }
}

.mini-ring img {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 150px;
    height: 150px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.2);
    border: 3px solid rgba(255, 255, 255, 0.9);
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
}

.mini-ring img:hover {
    transform: translate(-50%, -50%) scale(1.05);
    box-shadow: 0 15px 40px rgba(255, 107, 107, 0.3);
}

/* 当前播放信息 */
.current-song-info {
    text-align: center;
    margin-bottom: 30px;
}

.current-song-info h3 {
    color: #333;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 5px;
}

.current-song-info p {
    color: #666;
    font-size: 14px;
    margin: 0;
}

/* 进度条样式 */
.progress-section {
    width: 100%;
    max-width: 400px;
    margin: 20px 0;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    color: #666;
    font-size: 12px;
}

#progressBar {
    width: 100%;
    height: 6px;
    border-radius: 8px;
    background: rgba(255, 107, 107, 0.2);
    outline: none;
    -webkit-appearance: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

#progressBar::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #ff6b6b;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

#progressBar::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
}

#progressBar::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #ff6b6b;
    border: none;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
    cursor: pointer;
}

/* 控制按钮区域 */
.control-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 25px;
    margin: 30px 0;
}

.control-btn {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.3);
    position: relative;
    overflow: hidden;
}

.control-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transition: all 0.3s ease;
    transform: translate(-50%, -50%);
}

.control-btn:hover::before {
    width: 100%;
    height: 100%;
}

.control-btn:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
}

.control-btn:active {
    transform: translateY(-1px) scale(1.05);
}

/* 主播放按钮 */
#ctrlBtn {
    width: 70px !important;
    height: 70px !important;
    background: linear-gradient(135deg, #ff3838, #ff6b6b) !important;
    box-shadow: 0 8px 25px rgba(255, 56, 56, 0.4) !important;
}

#ctrlBtn:hover {
    transform: translateY(-4px) scale(1.15) !important;
    box-shadow: 0 12px 35px rgba(255, 56, 56, 0.5) !important;
}

/* 上一首/下一首按钮 */
#upp, #down {
    color: #ffffff;
    font-size: 18px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
}

/* 收藏按钮 */
.love {
    width: 45px;
    height: 45px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 50%;
    padding: 8px;
    background: rgba(255, 107, 107, 0.1);
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.2);
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
}

.love:hover {
    transform: scale(1.2);
    background: rgba(255, 107, 107, 0.2);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.3);
}

/* 音频元素隐藏 */
audio {
    display: none;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .player-layout {
        flex-direction: column;
    }
    
    .music-list-section {
        width: 100%;
        margin-bottom: 30px;
    }
    
    .player-main-section {
        min-height: 400px;
    }
}

@media (max-width: 768px) {
    .music-player-container {
        padding: 15px;
    }
    
    .music-player-card {
        padding: 20px;
    }
    
    .ring-wrapper {
        width: 250px;
        height: 250px;
    }
    
    .mini-ring img {
        width: 120px;
        height: 120px;
    }
    
    .control-buttons {
        gap: 20px;
    }
    
    .control-btn {
        width: 45px;
        height: 45px;
    }
    
    #ctrlBtn {
        width: 60px !important;
        height: 60px !important;
    }
    
    #musicTable td {
        padding: 10px 6px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .music-player-container {
        padding: 10px;
    }
    
    .music-player-card {
        padding: 15px;
    }
    
    .ring-wrapper {
        width: 200px;
        height: 200px;
    }
    
    .mini-ring img {
        width: 100px;
        height: 100px;
    }
    
    .control-buttons {
        gap: 15px;
    }
    
    .control-btn {
        width: 40px;
        height: 40px;
    }
    
    #ctrlBtn {
        width: 55px !important;
        height: 55px !important;
    }
    
    #musicTable td {
        padding: 8px 4px;
        font-size: 12px;
    }
    
    .music-list-section {
        padding: 15px;
    }
}

/* 音乐列表项选中状态 */
#musicTable tbody tr.playing {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.12), rgba(238, 90, 36, 0.12));
    border-left: 3px solid #ff6b6b;
}

#musicTable tbody tr.playing .song-name {
    color: #ff6b6b;
    font-weight: 600;
}

#musicTable tbody tr.playing .song-name::before {
    content: '🎵';
    margin-right: 5px;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* 特殊效果 */
.music-player-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #ff6b6b, #ee5a24, #ff3838, #ff6b6b);
    border-radius: 22px;
    z-index: -1;
    opacity: 0.1;
}

/* 加载动画 */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 107, 107, 0.3);
    border-radius: 50%;
    border-top-color: #ff6b6b;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}